﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using System.Web.UI.WebControls;
using eepg_contratos.Controllers;
using eepg_contratos.Utilities;

namespace eepg_contratos.Views.Shared
{
    public partial class Site : System.Web.UI.MasterPage
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            //AppInfo appInformation = AppInfo.GetInstance();
            //litAppTitle.Text = appInformation.ApplicationName;
            //litApplicationName.Text = appInformation.ApplicationName;

            //StringBuilder SB = new StringBuilder();
            //SB.Append("Developed by ");
            //SB.Append(appInformation.Author);
            //SB.Append(" on ");
            //SB.Append(appInformation.DevelopmentTime);
            //litAuthorInformation.Text = SB.ToString();

            String[] arr = (Request.QueryString["guid"] + "").ToString().Split('_');
            String menu_activo = "";
            String guid_opcion = "";

            if (arr.Length > 1)
            {
                menu_activo = arr[0];
                guid_opcion = arr[1];
            }
            
            String guid_rol = (String)Session["UserRol"] + "";
            SeguridadesController sc = new SeguridadesController();
            Session["PermisoOpcion"] = sc.VerificarPermisosOpcion(guid_opcion, guid_rol);

            String codusuario = (String)Session["UserCode"] + "";
            String nombreusuario = (String)Session["UserName"] + "";

            Session["BasePath"] = AppUtil.FullFormatURL("");
            Session["ImagesBasePath"] = AppUtil.FullFormatURL("") + "/Images";
            Session["GuidOption"] = guid_opcion;
            Session["ActiveMenu"] = menu_activo;
 
            if (codusuario == null){

            }
            else{


            }
           
        }


    }
}